<!DOCTYPE html>
<html  xmlns:th="http://www.thymeleaf.org">
   <head>
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
      <meta name="description" content="Gurdeep singh osahan">
      <meta name="author" content="Gurdeep singh osahan">
      <title>登录</title>
      <!-- Favicon Icon -->
      <link rel="icon" type="image/png" th:href="@{assets/localpic/103.jpg}">
      <!-- Bootstrap core CSS -->
      <link th:href="@{/vendor/bootstrap/css/bootstrap.min.css}" rel="stylesheet">
      <!-- Font Awesome-->
      <link th:href="@{/vendor/fontawesome/css/font-awesome.min.css}" rel="stylesheet">
      <!-- Material Design Icons -->
      <link th:href="@{/vendor/icons/css/materialdesignicons.min.css}" media="all" rel="stylesheet" type="text/css">
      <!-- Slick -->
      <link th:href="@{/vendor/slick-master/slick/slick.css}" rel="stylesheet" type="text/css">
      <!-- Lightgallery -->
      <link th:href="@{/vendor/lightgallery-master/dist/css/lightgallery.min.css}" rel="stylesheet">
      <!-- Select2 CSS -->
      <link th:href="@{/vendor/select2/css/select2-bootstrap.css}" />
      <link th:href="@{/vendor/select2/css/select2.min.css}" rel="stylesheet">
      <!-- Custom styles for this template -->
      <link th:href="@{/css/style.css}" rel="stylesheet">
   </head>
   <script>
      function showHint1(str)
      {

         var xmlhttp;
         // if (str=="")
         // {
         //     document.getElementById("userInfo").innerHTML="";
         //     return;
         // }
         if (window.XMLHttpRequest)
         {
            // IE7+, Firefox, Chrome, Opera, Safari 浏览器执行代码
            xmlhttp=new XMLHttpRequest();
         }
         else
         {
            // IE6, IE5 浏览器执行代码
            xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
         }
         xmlhttp.onreadystatechange=function()
         {
            if(xmlhttp.responseText=='OK'){
               document.getElementById("userInfo").innerHTML=xmlhttp.responseText.fontcolor("#3BFF62");
            }else {
               document.getElementById("userInfo").innerHTML=xmlhttp.responseText.fontcolor("#ff0000")
            }
         }
         xmlhttp.open("GET","/a1?id="+str,true);
         xmlhttp.send();
      }

      function showHint2(str)
      {
         var xmlhttp;
         if (window.XMLHttpRequest)
         {
            // IE7+, Firefox, Chrome, Opera, Safari 浏览器执行代码
            xmlhttp=new XMLHttpRequest();
         }
         else
         {
            // IE6, IE5 浏览器执行代码
            xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
         }
         xmlhttp.onreadystatechange=function()
         {
            if (xmlhttp.readyState==4 && xmlhttp.status==200)
            {
               if(xmlhttp.responseText.toString()=='OK'){
                  document.getElementById("pwdInfo").innerHTML=xmlhttp.responseText.fontcolor("#3BFF62");
               }else {
                  document.getElementById("pwdInfo").innerHTML=xmlhttp.responseText.fontcolor("#ff0000")
               }


            }
         }
         xmlhttp.open("GET","/a1?password="+str,true);
         xmlhttp.send();
      }
   </script>
   <body>
      <!-- Login -->
      <div class="bg-white" >
         <div class="container" data-bgimg="images/background.png">
            <div class="row justify-content-center align-items-center d-flex vh-100">
               <div class="col-lg-4 mx-auto">
                  <div class="osahan-login py-4">
                     <div class="text-center mb-4">
                        <a href="../web2/index.html"><img th:src="@{assets/localpic/103.jpg}" alt=""></a>
                        <h5 class="font-weight-bold mt-3">欢迎回来</h5>
                        <p class="text-muted">感谢有你</p>
                     </div>
                     <form th:action="@{/login222}" method="post">
                        <div class="form-group">
                           <label class="mb-1">ID</label>
                           <div class="position-relative icon-form-control">
                              <i class="mdi mdi-account position-absolute"></i>
                              <input type="text"  name="id" class="form-control" value="422202199904056117" onblur="showHint1(this.value)">
                              <span id="userInfo"></span>
                           </div>
                        </div>
                        <div class="form-group">
                           <label class="mb-1">Password</label>
                           <div class="position-relative icon-form-control">
                              <i class="mdi mdi-key-variant position-absolute"></i>
                              <input type="password" name="password" class="form-control" value="123456" onblur="showHint2(this.value)">
                              <span id="pwdInfo"></span>
                           </div>
                        </div>
                        <div class="custom-control custom-checkbox mb-3">
                           <input type="checkbox" class="custom-control-input" id="customCheck1" name="remember">
                           <label class="custom-control-label" for="customCheck1">记住密码</label>
                        </div>
                        <button class="btn btn-success btn-block text-uppercase" type="submit"> 登录</button>
<!--                        <div class="text-center mt-3 border-bottom pb-3">-->
<!--                           <p class="small text-muted">或者登陆</p>-->
<!--                           <div class="row">-->
<!--                              <div class="col-6">-->
<!--                                 <button type="button" class="btn btn-outline-instagram btn-block"><i class="mdi mdi-instagram"></i> QQ</button>-->
<!--                              </div>-->
<!--                              <div class="col-6">-->
<!--                                 <button type="button" class="btn btn-outline-facebook btn-block"><i class="mdi mdi-facebook"></i> 微信</button>-->
<!--                              </div>-->
<!--                           </div>-->
<!--                        </div>-->
                        <div class="py-3 d-flex align-item-center">
                           <a th:href="@{/toForgotPassword}">忘记密码？</a>
                           <span class="ml-auto"> 新用户? <a th:href="@{/toRegister}">现在加入</a></span>
                        </div>
                     </form>
                  </div>
               </div>
            </div>
         </div>
      </div>
      <!-- End Login -->
      <!-- Bootstrap core JavaScript -->
      <script th:src="@{vendor/jquery/jquery.min.js}"></script>
      <script th:src="@{vendor/bootstrap/js/bootstrap.bundle.min.js}"></script>
      <!-- Contact form JavaScript -->
      <!-- Do not edit these files! In order to set the email address and subject line for the contact form go to the bin/contact_me.php file. -->
      <script th:src="@{js/jqBootstrapValidation.js}"></script>
      <script th:src="@{js/contact_me.js}"></script>
      <!-- Slick -->
      <script th:src="@{vendor/slick-master/slick/slick.js}" type="text/javascript" charset="utf-8"></script>
      <!-- lightgallery -->
      <script th:src="@{vendor/lightgallery-master/dist/js/lightgallery-all.min.js}"></script>
      <!-- select2 Js -->
      <script th:src="@{vendor/select2/js/select2.min.js}"></script>
      <!-- Custom -->
      <script th:src="@{js/custom.js}"></script>
   </body>
</html>